﻿using GalaSoft.MvvmLight;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CastingWellEquipmentGUI.Model
{
    public class Role : ObservableObject
    {
        private int _RoleId;
        public int RoleId
        {
            get { return _RoleId; }
            set
            {
                _RoleId = value;
                RaisePropertyChanged(() => RoleId);
            }
        }
        private string _RoleName;
        public string RoleName
        {
            get { return _RoleName; }
            set
            {
                _RoleName = value;
                RaisePropertyChanged(() => RoleName);
            }
        }

        /// <summary>
        /// 拥有的权限
        /// </summary>
        private ObservableCollection<Permissions> _Permissions = new ObservableCollection<Permissions>();
        /// <summary>
        /// 拥有的权限
        /// </summary>
        public ObservableCollection<Permissions> Permissions
        {
            get { return _Permissions; }
            set
            {
                _Permissions = value;
                RaisePropertyChanged(() => Permissions);
            }
        }
    }
}
